package com.diaohw.module.file.service.impl;

import com.diaohw.module.file.mapper.FileTagMapper;
import com.diaohw.module.file.service.FileTagService;
import com.mybatisflex.core.query.QueryColumn;
import com.mybatisflex.core.query.QueryWrapper;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class FileTagImpl implements FileTagService {

    @Resource
    private FileTagMapper fileTagMapper;

    @Override
    public boolean delete(QueryColumn column, List<String> val) {

        int i = fileTagMapper.deleteByQuery(QueryWrapper.create().in(column.getName(), val));
        return i > 0;
    }
}
